import request from "@/utils/request";

// -------数据字典主页面----
// 查询列表
export function listSysDicts(query) {
  return request({
    url: "/api/sysDicts/list",
    method: "get",
    params: query,
  });
}

// 新增
export function addSysDicts(data) {
  return request({
    url: "/api/sysDicts/add",
    method: "post",
    data: data,
  });
}
// 编辑
export function updateSysDicts(data) {
  return request({
    url: "/api/sysDicts/update",
    method: "post",
    data: data,
  });
}

// -------数据字典子页面----
export function listAllDicts(query) {
  return request({
    url: "/api/dicts/listAll",
    method: "get",
    params: query,
  });
}

// 新增
export function addDicts(data) {
  return request({
    url: "/api/dicts/add",
    method: "post",
    data: data,
  });
}
// 编辑
export function updateDicts(data) {
  return request({
    url: "/api/dicts/update",
    method: "post",
    data: data,
  });
}
// 删除
export function delDicts(data) {
  return request({
    url: "/api/dicts/del",
    method: "post",
    data: data,
  });
}
